package com.mkyong.core;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * Spring bean
 * 
 */
public class HelloWorld {
	
	@Autowired
	private HelloWorld1 helloWorld1;
	
	private String name;

	public void setName(String name) {
		this.name = name;
	}

	public void printHello() {
		System.out.println("Spring 3 : Hello ! " + name);
	}
	
	public void printHelloWorld1(){
		helloWorld1.printHello();
	}
	
}